<template>
  <div id="app">
    <keep-alive>
      <router-view/>
    </keep-alive>

    <transition name="fade">
      <LoginPlane v-if="login_show"/>
    </transition>
  </div>
</template>

<script>
import LoginPlane from "@/components/common/Login.vue";

export default {
  components: {
    LoginPlane
  },
  computed: {
    login_show() {
      return this.$store.state.login_show;
    }
  },
  created() {
    this.$store.dispatch('getUserinfo');
  }
};
</script>

<style lang="less">
#app {
  height: 100%;
}
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
</style>

